Skip to content

feat: configurable activation key and click blocking - #4

Merged
Peyton-Spencer merged 1 commit into
mainfrom
feat/configurable-key-click-blocking
Feb 9, 2026
Merged

feat: configurable activation key and click blocking#4
Peyton-Spencer merged 1 commit into
mainfrom
feat/configurable-key-click-blocking

Conversation

@Peyton-Spencer

Copy link
Copy Markdown
Contributor

Summary

  • Add key option to SolidGrabPluginOptions — configure activation key from vite.config.ts (default Alt, supports Meta/Control)
  • Pass key config through virtual module to runtime via initSolidGrab({ key }) (deferred auto-init with queueMicrotask so plugin options win)
  • Block click events (capture phase) when activation key is held, preventing the underlying page's click handlers from firing during grab

Test plan

  • 4 new tests for virtual module key config (Alt default, Meta, Control, non-virtual returns undefined)
  • All 63 tests pass (bun test)
  • Type-check passes (bunx tsc --noEmit)
  • Live tested in ditto-app — overlay badge visible, runtime initialized, 56 elements with data-solid-source

🤖 Generated with Claude Code

Add `key` option to plugin options (default Alt, supports Meta/Control)
passed through the virtual module to the runtime. Block click events
on the underlying page when the activation key is held so grabbing
doesn't trigger element handlers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Peyton-Spencer
Peyton-Spencer merged commit 728b7f3 into main Feb 9, 2026
1 check passed
@Peyton-Spencer
Peyton-Spencer deleted the feat/configurable-key-click-blocking branch February 9, 2026 00:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant